package com.luoqiu.yygh.cmn.client;

import com.luoqiu.yygh.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "service-cmn")
// Repository 交给spring去管理
@Repository
public interface DictFeignClient {

    // 这里需要和调用的controller的方法相同 url路径需要补全  @PathVariable 需要指定参数的名字

    @GetMapping(value = "/admin/cmn/dict/getName/{dictCode}/{value}")
    Result<String> getName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);

    @GetMapping(value = "/admin/cmn/dict/getName/{value}")
    Result<String> getName(@PathVariable("value") String value);
}
